package com.chb.docter.feigns;

import com.chb.docter.factory.DeptFeignFallbackFactory;
import com.chb.docter.factory.MedicinesFeignFallbackFactory;
import com.hos.entity.stock.Medicines;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: 陈海彬
 * @date: Created in 2023/12/14 16:18
 * @description:
 * @modified By:
 * @version:
 */
@FeignClient(name = "hos-sale", fallbackFactory = MedicinesFeignFallbackFactory.class)
public interface MedicinesFeign {


    /**
     * 根据id查询并修改库存
     *
     * @param medicines 药品列表
     */
    @PostMapping("/sale/erp/medicines/reducePharmaceuticalById")
    boolean reducePharmaceuticalById(@RequestBody Medicines medicines);


    /**
     * 根据id查询并添加库存
     *
     * @param medicines 药品列表
     */
    @PostMapping("/sale/erp/medicines/addPharmaceuticalById")
    boolean addPharmaceuticalById(@RequestBody Medicines medicines);
}
